<template>
  <div>
    <van-address-edit
        :area-list="areaList"
        show-delete
        @save="onSave"
        @delete="onDelete"
    />
  </div>
</template>

<script>
import { areaList } from '@vant/area-data';
import { Toast } from 'vant';
export default {
  name: "addressNew",
    data() {
      return {
        areaList,
      };
    },
    methods: {
      onSave(item) {
        let instance = Toast('save OK');
        setTimeout(() => {
          instance.close()
          this.$router.push('/addressList'), 1000
        })
      },
      onDelete() {
        history.go(-1)
      }
    }
}
</script>

<style scoped>

</style>